﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RolesAuthorizedPage.aspx.cs"
    Inherits="Torch.WL.Web.Admin.Modubles.RolesAuthorizedPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../../Inc/Style/<%=Request.Cookies["UIStyle"].Value%>/css/indexControl.css"
        rel="stylesheet" type="text/css" />
    <script src="../../../Inc/Script/pub.js" type="text/javascript"></script>
    <link href="../../../resources/css/Framework.css" rel="stylesheet" type="text/css" />
    <style>
        .CurrentSelected
        {
            font-weight: bold;
            color: #ff0000;
        }
        table
        {
        }
        .normalLineHeight
        {
            line-height: 20px;
        }
        .normalwidth
        {
            width: 10%;
        }
        td
        {
            text-align: left;
        }
        .normalLineHeight td
        {
            text-align: left;
        }
        .w_inputAreaA td
        {
            line-height: 20px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divToolBar" class="topBar">
        <div class="toolBar">
        </div>
        <div class="moduleName">
            角色授权</div>
    </div>
    <div class="w_wrapper w_marginTop">
        <div class="w_header">
            <div id="strinfo" runat="server" class="w_info" visible="false">
            </div>
        </div>
        <div class="w_content">
            <div class="w_inputAreaA normalLineHeight" style="height: 500px; padding: 5px 5px 5px 5px;">
                <table>
                    <tr>
                        <td width="200">
                            <div style="padding-right: 10px; height: 500px;">
                                请选择分组：<asp:DropDownList ID="GroupList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="GroupList_SelectedIndexChanged">
                                </asp:DropDownList>
                                <asp:Label ID="Rid" runat="server" Text="" Style="display: none;"></asp:Label>
                                <asp:GridView ID="RoleView" Width="100px" runat="server" DataKeyNames="RoleID" AllowSorting="True"
                                    OnRowCommand="RoleView_RowCommand" AutoGenerateColumns="False" ShowHeader="False"
                                    GridLines="None">
                                    <Columns>
                                        <asp:BoundField DataField="RoleID" HeaderText="编号" Visible="false">
                                            <ItemStyle HorizontalAlign="Center" Wrap="false" />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText="名称">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lbtn_name" CommandArgument='<%#Eval("RoleID") %>' CommandName="EditView"
                                                    runat="server" Text='<%# Eval("RoleName") %>' ToolTip='<%# Eval("RoleDescription") %>'></asp:LinkButton>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Left" Width="100px" Height="24px" />
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </div>
                        </td>
                        <td valign="top" style="vertical-align:top">
                            请选择模块：<asp:DropDownList ID="ModuleTypeList" runat="server" Enabled="false" AutoPostBack="True"
                                OnSelectedIndexChanged="ModuleTypeList_SelectedIndexChanged">
                            </asp:DropDownList>
                            <asp:GridView ID="ModuleView" runat="server" DataKeyNames="ModuleID" CssClass="w_table"
                                AllowSorting="True" AutoGenerateColumns="False" OnRowDataBound="ModuleView_RowDataBound"
                                OnSelectedIndexChanging="ModuleView_SelectedIndexChanging" GridLines="None" Width="100%">
                                <Columns>
                                    <asp:TemplateField HeaderText="模块名称">
                                        <ItemTemplate>
                                            <asp:Label ID="lab_ID" runat="server" Text='<%# Eval("ModuleID")%>' Style="display: none"></asp:Label>
                                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("ModuleName") %>'></asp:Label>
                                            <asp:Label ID="lab_Verify" runat="server" Text="" Style="display: none"></asp:Label>
                                            <input type="hidden" id="hidModuleTag" runat="server" value='<%# Eval("ModuleTag") %>' />
                                        </ItemTemplate>
                                        <HeaderStyle Wrap="False" Width="80px" />
                                        <ItemStyle HorizontalAlign="Left" Wrap="False" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="权限列表">
                                        <ItemTemplate>
                                            <asp:Repeater ID="rptAuthrityList" runat="server">
                                                <ItemTemplate>
                                                    <asp:Literal ID="ltlTypeName" runat="server" Text='<%# Eval("TypeName") %>'></asp:Literal>
                                                    <%# Eval("TypeName").ToString().Length>0?"<hr size=1 width=95% align=left />":"" %>
                                                    <asp:CheckBoxList ID="AuthorityList_Grant" runat="server" RepeatDirection="Horizontal"
                                                        RepeatLayout="Flow" RepeatColumns="6" CssClass="normalwidth">
                                                    </asp:CheckBoxList>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </ItemTemplate>
                                        <HeaderStyle Wrap="False" />
                                        <ItemStyle Wrap="False" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText=" 更新 ">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="btn_update" runat="server" CommandArgument='<%# Eval("ModuleID")%>'
                                                CausesValidation="False" CommandName="Select" Text="更新"></asp:LinkButton>
                                        </ItemTemplate>
                                        <HeaderStyle Wrap="False" Width="80px" />
                                        <ItemStyle Wrap="False" />
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle CssClass="header" />
                                <AlternatingRowStyle CssClass="w_trEven" />
                            </asp:GridView>
                            <asp:Button ID="btn_AllSave" runat="server" CssClass="w_button" Visible="false" Text="保存全部"
                                OnClick="btn_AllSave_Click" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
